<script setup lang="ts">
defineOptions({ name: "WebxTitle" });
defineProps({
  title: { type: String, default: "" }
});
</script>

<template>
  <div class="webx-title">
    <!-- 修改插槽判断逻辑为 title -->
    <slot v-if="$slots.title" name="title" />
    <div v-else-if="title" class="flex items-center gap-2">
      <span class="x-bg-primary w-1 h-4 rounded"></span>
      {{ title }}
    </div>
  </div>
</template>

<style scoped lang="less"></style>
